
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.util.R;
import com.shop.cloud.mall.api.service.GoodsSpuSpecService;
import com.shop.cloud.mall.common.entity.GoodsSpuSpec;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * spu规格
 *
 * @author
 * @date 2019-08-13 16:56:46
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/goodsspuspec")
@Tag(description = "goodsspuspec", name = "spu规格接口API")
public class GoodsSpuSpecController {

    private final GoodsSpuSpecService goodsSpuSpecService;


	/**
	 * 获取商品规格
	 * @param goodsSpuSpec
	 * @return
	 */
	@Operation(summary = "获取商品规格")
	@GetMapping("/tree")
	public R getGoodsSpuSpecTree(GoodsSpuSpec goodsSpuSpec) {
		return R.ok(goodsSpuSpecService.tree(goodsSpuSpec));
	}

}
